<div class="span10" style="background: #fff;margin-left: 2px;">
<table width="100%" style="margin: 0;padding: 0;" id="_content">
    <tr>
        <td class="hzbar"></td>
        <td style="padding: 10px 15px;" valign="top">
<?php echo $this->session->flashdata('_message'); ?>
<!-- Modal Form -->
<?php echo anchor('administrator/banner/index/create','<i class="icon-plus"></i>Add new banner','class="btn"'); ?>
<div style="margin-bottom: 15px;">
    <?php if(!empty($action)){$this->load->view('layouts/form/banner');} 
        if(!empty($banners)){
    ?>
    <table class="table table-striped table-bordered table-condensed">
    <?php 
        foreach($banners as $banner){
    ?>
        <tr>
            <td width="15%"><img src="<?php echo base_url().$banner->image?>" style="height: 120px;"/></td>
            <td width="30%"><?php echo $banner->name ?></td>
            <td width="30%"><a href="<?php echo $banner->link ?>" target="_blank"><?php echo $banner->link ?></a></td>
            <td><?php  
            if($banner->position==0)
            {$cat_name='Left site';}
            else{
                $cat_name = $this->_global->_unserialize(_get_cat_by_id($banner->position));
               $cat_name = $cat_name[$this->session->userdata('lan')]['title'];} echo $cat_name;?></td>
            <td  width="5%"><?php echo anchor('administrator/banner/index/edit/'.$banner->id,'Edit','class="btn"')?></td>
            <td width="5%"><?php echo anchor('administrator/banner/index/delete/'.$banner->id,'Delete','class="btn"')?></td>
        </tr>
    <?php
        }
    ?>
    </table>
    <?php
        }
    ?>

</div>
</td></tr></table>
</div>